package com.woniuxy.rms.dao;

import com.woniuxy.rms.pojo.Logs;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface LogsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Logs record);

    int insertSelective(Logs record);

    Logs selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Logs record);

    int updateByPrimaryKey(Logs record);

    /**
     * Description : 日志列表  <br/>
     * ChangeLog : 1. 创建 (2020/3/28 0028 下午 12:38 [Administrator]);
     * @param currentPage 当前页
     * @param pageSize 页大小
     * @param operate
     * @param begin
     * @param end
     * @param role
     * @return com.woniuxy.rms.util.DataResult
     */
    List<Logs> findByPage(@Param("currentPage") Integer currentPage, @Param("pageSize") Integer pageSize,
                          @Param("operate") String operate, @Param("begin") Date begin,
                          @Param("end") Date end,@Param("role") String role);

    @Delete("delete from logs where create_time <= #{value}")
    int clearLog(Date time);
}